<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <div :style="{fontSize:size,color:color}">1234</div>
        <div :style="[{fontSize:size,color:green}]">我们</div>
    </div>
    <div id="box">
        <div v-html="green"></div>
    </div>
    
    <script src="./vue.js"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                size:'12px',
                color:'red',
                green:'blue'
            }
        })

        let obj = {
            a:1
        };

        let divs = document.querySelector('#box').querySelectorAll('div');
        let target;
        for(let i = 0;i<divs.length;i++){
            if(divs[i].getAttribute('v-html') === 'green'){
                divs[i].innerHTML = obj.a
               target = divs[i]
            }
        }

        Object.defineProperty(obj,'a',{
            set(newVal){
                target.innerHTML = newVal;
            },
            get(){
                return '1'   
            }
        })

        
    </script>
</body>
</html>